package com.sunny.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.sunny.dataobject.OrderDetail;
import com.sunny.enums.OrderStatusEnum;
import com.sunny.enums.PayStatusEnum;
import com.sunny.utils.serializer.Date2LongSerializer;
import lombok.Data;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created by dell on 2018/3/30.
 */
@Data
//@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
//@JsonInclude(JsonInclude.Include.NON_NULL)
public class OrderDTO {
    private String orderId;//订单id

    private String buyerName;//买家名字

    private String buyerPhone;//买家手机号

    private String buyerAddress;//买家地址

    private String buyerOpenid;//买家微信openid

    private BigDecimal orderAmount;//订单总金额

    private Integer orderStatus;//订单状态，默认0新下单

    private Integer payStatus;//支付状态，默认0未支付，
    @JsonSerialize(using = Date2LongSerializer.class)
    private Date createTime;//创建时间
    @JsonSerialize(using = Date2LongSerializer.class)
    private Date updateTime;//更新时间

    private List<OrderDetail>  orderDetailList=new ArrayList<>();//赋初始值
}
